#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:hello.py
# author:Jackiex
# datetime:2023/5/22 10:38
# software: PyCharm

"""
  定义一个Web应用
"""


def application(environ, start_response):
    start_response('200 OK', [('Content-Type', 'text/html')])
    body_html = '''<table border="1" cellpadding="0" cellspacing="0" bgcolor="#fff" width="100%">
			<tr class="textcenter">
				<td><h2>留言列表</h2></td>
				<td>操作</td>
			</tr>
			<tr>
				<td>
					<div class="userinfo">
						<div class="headpic">
							<br>
						</div>
						<div style="margin-left: 10%">
							<h4 class="title">留言标题</h4>
							<span class="datetime">留言时间</span>
							<p class="content">留言内容</p>
						</div>

					</div>
				</td>
				<td align="center"><a href="#">更改</a>|<a href="#">删除</a></td>
			</tr>

		</table>'''

    body = body_html
    # return [b'<h1>Hello, web hahhahah!</h1>']

    return [body.encode('gbk')]

def application1():
    pass

def application2():
    pass
